package com.klxedu.ms.gateway.security.client;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.klxedu.ms.gateway.core.json.BaseJsonObject;
import com.klxedu.ms.gateway.security.client.service.RoleMenu;

/**
 * 角色权限服务FeignClient
 * 
 * @author songhuiqing
 *
 */
@FeignClient(name = "MS-ROLEAUTH", url="${client.ms-roleauth}")
public interface RoleAuthFeignClient {

	/**
	 * 根据用户ID获取角色ID列表
	 * 
	 * @param userID
	 * @return
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/workbench/role/listRoleIDByUserId")
	public BaseJsonObject<String[]> listRoleIDByUserId(@RequestParam(name = "userID", required = true) String userID);

	/**
	 * 查询角色对应菜单信息
	 * 
	 * @return
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/workbench/role/listRoleMenuOpt")
	public BaseJsonObject<List<RoleMenu>> listRoleMenuOpt();

}
